package com.gdcp.service;

import com.gdcp.beans.Comment;
import com.gdcp.common.page.PageBean;
import org.springframework.security.access.prepost.PreAuthorize;

import java.util.List;
import java.util.Map;

/**
 * @author 杨华京
 * @version 1.0
 * @description
 * @since 1.8
 */
public interface CommentService {

    Map<String,Object> insert(Comment comment);

    List<Comment> queryListByProductId(Integer id);

    Comment queryInfoById(Integer user_id, Integer product_id, Integer id);

    int doSupport(Integer cid);

    int doOppose(Integer cid);

    int deleteById(Integer id);

    Map<String, Object> findPageBreakByCondition(Map<String, Object> model, Integer shop_id);

    Map<String, Object> removeByPrimaryKey(Integer[] ids);

    Map<String,Object> updateInformation(Comment comment);

    Comment getInformation(Integer id);

    Map<String, Object> searchInformation(Map<String, Object> param);

    //int queryByParentId(Integer parent_id);

    Comment queryInfoByParentId(Integer id);

    PageBean<Comment> queryByPage(Integer id, int pc);

    @PreAuthorize("hasAuthority('ROLE_ADMIN')")
    Map<String, Object> findAll(Map<String, Object> model);

    Map<String, Object> searchInformationByShopId(Map<String, Object> param, Integer shop_id);

    Comment getInformationByParentId(Integer id);

    Comment getInformationByOrderItemId(Integer id);
}
